package com.sencorsta.ids.test;

import java.io.*;

public class file {
    public static void main(String[] args) throws IOException {
        File file = new File("C://8DAFEDBB5BE81C2C.txt");
        if (file.isFile() && file.exists()) { //判断文件是否存在
            InputStreamReader read = new InputStreamReader(
                    new FileInputStream(file), "UTF-8");//考虑到编码格式
            BufferedReader bufferedReader = new BufferedReader(read);
            String lineTxt = null;
            while ((lineTxt = bufferedReader.readLine()) != null) {
                if (lineTxt.startsWith("[")){
                    System.out.println(lineTxt);
                }
            }
            read.close();
        }
    }
}
